package File;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class Demo7 {
    public static void main(String[] args) {
        File file = new File("./");
        String[] list = file.list();
        System.out.println(Arrays.toString(list));

        File[] fileList = file.listFiles();
        System.out.println(Arrays.toString(fileList));
    }
//    public static void main(String[] args) throws IOException {
//       File file = new File("./test.txt");
//        System.out.println(file.createNewFile());
//        String[] list = file.list();
//        System.out.println(Arrays.toString(list));
//    }
}
